package com.hsjk.szwj.module.train.convert;

import com.hsjk.szwj.module.train.api.dto.OrderDTO;
import com.hsjk.szwj.module.train.api.dto.OrderUpdateDTO;
import com.hsjk.szwj.module.train.controller.app.vo.order.*;
import com.hsjk.szwj.module.train.dal.dataobject.order.OrderDO;
import com.hsjk.szwj.module.train.dal.dataobject.product.ProductSkuBindDO;
import com.hsjk.szwj.module.train.dal.dataobject.product.ProductSkuDO;
import org.mapstruct.Mapper;
import org.mapstruct.factory.Mappers;

import java.util.List;

/**
 * @author chenjiawei
 * @desc
 * @Date 2023/08/28 11:25
 **/
@Mapper
public interface OrderConvert {
    OrderConvert INSTANCE = Mappers.getMapper(OrderConvert.class);

    OrderDO convertOrderDO(OrderCreateReqVO reqVO);

    OrderInfoRespVO convertOrderInfoRespVO(OrderDO orderDO);

    OrderDTO convertOrderDTO(OrderDO orderDO);

    OrderSkuInfoRespVO convertOrderSkuInfoRespVO(ProductSkuDO skuDO);

    List<OrderSkuBindInfoRespVO> convertOrderSkuBindInfoList(List<ProductSkuBindDO> bindDOList);

    OrderDO convertOrderDO(OrderUpdateDTO reqVO);

    OrderBasicInfoRespVO convert(OrderDO orderDO);
}
